home *** CD-ROM | disk | FTP | other *** search
/ 3D Images / 3D Images.iso / programs / amiga / batchfactory / scripts / imagefx / image-fx_images_to_anim5 < prev    next >
Encoding:
Text File  |  1995-01-12  |  2.2 KB  |  80 lines

  1. /* 
  2.                          IMAGE FX IMAGES TO ANIM 5
  3.                                By J.L. White
  4.                           ©1994 Merlin's Software
  5.  
  6.                   Create Animation From Individual Images
  7.                               ImageFX Script
  8.  
  9.  Batch Factory Batch Conversion Scripts are basically Arexx scripts that
  10. allow you to pass certain parameters to the external program you wish
  11. to use to convert the images from one format to another. You can pass
  12. five different strings from Batch Factory to the script by using the
  13. following commands:
  14.  
  15. $N = This will pass the current selected filename.
  16. $P = This will tell Batch Factory to ask for a path to save new frames to.
  17. $# = This will pass the current frame number in the script.
  18. $T = This will pass the total number of frames in the script.
  19. $A = This will pass an offset number to be used to save frames with.
  20.  
  21. NOTE: The following line is required to work as a Batch Factory Script:
  22.  
  23. PARSE=$N $# $T
  24.  
  25. */
  26.  
  27. options results
  28. call Locate_ImageFX
  29.  
  30. address "IMAGEFX.1"
  31. arg InPic FrameNum TotalNum
  32.  
  33. if FrameNum = 1 then do
  34.     ScreenToFront
  35.     RequestResponse "This Will Use Your Current Render Mode To Create Animation!"
  36.     if rc ~= 0 then do
  37.         RequestNotify "You Must Abort Script & Select Correct Render Mode!"
  38.         ScreenToBack
  39.         address command "Wait 3"
  40.         exit
  41.         end
  42.     RequestString '"Enter Path & Name To Use For Animation!"'
  43.     Answer = Result
  44.     RequestResponse "Do You Want To Convert The Images To Grey Scale?"
  45.     Answer2 = "YES"
  46.     if rc ~= 0 then Answer2 = "NO"
  47.     call open TempFile,"Ram:IFITA5",W
  48.     call writeln TempFile,Answer
  49.     call writeln TempFile,Answer2
  50.     call close TempFile
  51.     end
  52. else do
  53.     call open TempFile,"Ram:IFITA5",R
  54.     line = readln(TempFile)
  55.     parse var line Answer
  56.     line = readln(TempFile)
  57.     parse var line Answer2
  58.     call close TempFile
  59.     end
  60. LoadBuffer InPic Force Smooth
  61. if Answer2 = "YES" then Color2Grey 333 334 333
  62. Render Go
  63. if FrameNum = TotalNum then 
  64.     SaveRenderedAs ANIM Answer Close
  65. else
  66.     SaveRenderedAs ANIM Answer Keep
  67. if FrameNum = TotalNum then do
  68.     address command "delete >NIL: Ram:IFITA5"
  69.         end
  70. exit
  71.  
  72. Locate_ImageFX:
  73.     if (POS('IMAGEFX.1',SHOW('Ports')) = 0)
  74.     then do
  75.         address command 'run < nil: > nil: IMAGEFX:ImageFX'
  76.         address command 'wait 7'
  77.     end
  78. return
  79.  
  80.